var index = require('../method/index');
var testData = require('../method/testData');
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
    res.render('index', { Title: '厨娘', SourceUrl: '' });
});
router.get('/index', function(req, res, next) {
    res.render('index', { Title: '厨娘', SourceUrl: '' });
});

router.get('/login', function(req, res, next) {
    res.render('login', index.init());
});
router.get('/register', function(req, res, next) {
    res.render('register', { Title: '注册新用户', SourceUrl: '/login' });
});

router.get('/set-password', function(req, res, next) {
    res.render('register-setpassword', { Title: '设置密码', SourceUrl: '/register' });
});

router.get('/findpassword', function(req, res, next) {
    res.render('findpassword', { Title: '找回密码', SourceUrl: '/login' });
});

router.get('/foods', function(req, res, next) {
    res.render('foods', { Title: '菜系', SourceUrl: '/' });
});

router.get("/female-cook", function(req, res, next) {
    res.render("female-cook", { Title: "厨娘", SourceUrl: "/" });
});

router.get("/female-page/:id(\\d)", function(req, res, next) {
    res.render("female-page", { Title: "青", SourceUrl: "/female-cook/" })
});

router.get('/user', function(req, res, next) {
    res.render('user', { title: 'Express' });
});

router.get('/test', function(req, res, next) {
    res.render('test', { title: 'Express' });
});

router.get('/testData', function(req, res, next) {
    testData.init(req, res, next);
});
module.exports = router;